fix: resolve DNF5 module stream naming and invalid recovery instructions#21
Merged
Merged
Conversation
…ons (closes #20) - Add dnf_resolve_php_stream() to detect real stream name from dnf module list php (handles both Remi remi-X.Y and RHEL AppStream X.Y naming) - Add dnf_stream_enabled() to skip destructive reset/enable when the correct stream is already active - Add dnf_major_version() to emit correct config-manager syntax for DNF4 vs DNF5 (--set-enabled removed in DNF5/Fedora 41+) - Fix install_php_dnf() and use_php_version() to use resolved stream name instead of hardcoded php:X.Y (which does not exist on Remi/Fedora) - Fix pkg_search_php() to detect un-enabled remi-X.Y streams as available - Fix suggest_repository_setup() Fedora instructions: replace non-existent remi-php82 repo with dnf module enable php:remi-X.Y, use version-aware config-manager syntax - Add tests/05_dnf.bats with 8 unit tests using PATH-based dnf stubs for Remi (DNF5), enabled-stream, and AppStream (DNF4) fixtures - Bump version to 1.12.2 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes all defects reported in #20 (phpvm install fails on Fedora 44 / DNF5).
dnf_resolve_php_streamhelper parsesdnf module list phpto find the actual stream for a requested version — handles both Remi (remi-8.2) and RHEL AppStream (8.2) naming instead of hardcoding the non-existentphp:8.2streamdnf_stream_enabledhelper lets install and use skipdnf module resetwhen the correct stream is already active, preventing the reset-then-fail loopsuggest_repository_setupnow usesdnf config-manager setopt <repo>.enabled=1on DNF5 (Fedora 41+) and replaces the non-existentremi-php82repo reference with the correctdnf module enable php:remi-X.Y -yinstructionpkg_search_phpuses stream resolution so un-enabledremi-X.Ystreams are detected as availableTest plan
bash -n phpvm.sh— syntax cleanbats tests/— 91/91 pass (8 new tests intests/05_dnf.batsusing PATH stubs for Remi/DNF5, enabled-stream, and AppStream/DNF4 fixtures)Closes #20
🤖 Generated with Claude Code